<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="description" content="Noun发布平台">
<meta name="author" content="Noun发布平台">
<link rel="shortcut icon" href="/static/assets/images/favicon_1.ico">
<title>Noun发布平台</title>
<!--Morris Chart CSS -->

<link rel="stylesheet" href="/static/assets/css/xterm.css" />
<link rel="stylesheet" href="/static/assets/css/style.css" />
<script src="/static/assets/js/xterm.js"></script>
    <style>
        #sidebar-menu ul ul a.hover {
           color: #000;
            background-color: #5fbeaa;
        }
        #sidebar-menu ul ul a.hover:hover {
           color: #fff;
            background-color: #5fbeaa;
        }
    </style>
{% include 'public/head_css.html' %}

{% include 'public/head_script.html'%}
</head>
<body class="fixed-left">

<!-- Begin page -->
<div id="wrapper">
  <!-- Top Bar Start -->
  <div class="topbar">
    <!-- LOGO -->
    <div class="topbar-left">
      <div class="text-center">
          <a href="/" class="logo">
              <i>
                  <img width="35" height="30"  src="/static/assets/images/users/avatar-1.png" alt="">
              </i>
              <span style="margin-left:10px">发布平台</span>
          </a>
      </div>
    </div>
    <!-- Button mobile view to collapse sidebar menu -->
    <div class="navbar navbar-default" role="navigation">
      <div class="container">
        <div class="">
          <div class="pull-left">
            <button class="button-menu-mobile open-left" onclick="close_side();"> <i class="ion-navicon"></i> </button>
            <span class="clearfix"></span> </div>
          <ul class="nav navbar-nav navbar-right pull-right">
            <li class="hidden-xs"> <a href="javascript:void(0);" style="cursor:default; pointer-events:none;" class="waves-effect waves-light">欢迎您：</a></li>
              <li class="dropdown">
                  <a href="" class="dropdown-toggle" data-toggle="dropdown" aria-expanded="true">
                      <img src="/static/assets/images/users/avatar.jpg" alt="user-img" style="border:none;border-radius:40%;" width="33px" height="33px">
                      <span class="badge" style="background-color: red;"></span>

                  </a>
              <ul class="dropdown-menu">
                <li>
                    <a href=""><i class="icon-envelope m-r-5"></i> 消息中心</a>
                      <span class="badge" style="background-color: red;"></span>
                </li>
                <li><a href=""><i class="ti-user m-r-5"></i> 个人信息</a></li>
                <li><a href="{% url 'logout' %}"><i class="ti-power-off m-r-5"></i> 退出系统</a></li>
              </ul>
            </li>
          </ul>
        </div>
        <!--/.nav-collapse -->
      </div>
    </div>  <!--首页导航菜单-->
  </div>

  <!-- ========== Left Sidebar Start ========== -->
  <div class="left side-menu">
    <div class="sidebar-inner slimscrollleft">
      <!--- Divider -->
      <div id="sidebar-menu">
        <ul>
            <li> <a href="{% url 'index' %}" class="waves-effect "><i class="fa fa-home"></i><span>系统首页</span></a> </li>
            <li class="has_sub"> <a href="#" style="display:none;" class="waves-effect"><i class="fa fa-user"></i><span>用户管理</span></a>
              <ul class="list-unstyled">
                  <li><a href="{% url 'users' %}">用户管理</a></li>
                  <li><a href="#">操作日志</a></li>
              </ul>
            </li>


            <li class="has_sub"> <a href="#" style="display:none;" class="waves-effect"><i class="fa fa-database"></i><span>集群配置</span></a>
              <ul class="list-unstyled">
                  <li><a href="{% url 'k8sinfo' %}">集群信息</a></li>
                  <li><a href="{% url 'bind' %}">环境绑定</a></li>
              </ul>
            </li>

              <li class="has_sub"> <a href="#" style="display:none;" class="waves-effect"><i class="fa fa-flag"></i><span>项目管理</span></a>
                <ul class="list-unstyled">
                    <li><a href="">项目列表</a></li>
                    <li><a href="">配置列表</a></li>
                </ul>
              </li>

              <li class="has_sub"> <a href="#" style="display:none;" class="waves-effect"><i class="fa fa-file"></i><span>配置管理</span></a>
                <ul class="list-unstyled">
                    <li><a href="">Configmap配置</a></li>
                </ul>
              </li>

              <li class="has_sub"> <a href="#" style="display:none;" class="waves-effect"><i class="fa fa-send"></i><span>部署管理</span></a>
                <ul class="list-unstyled">
                    <li><a href="">新建部署</a></li>
                    <li><a href="">部署列表</a></li>
                </ul>
              </li>
        </ul>
        <div class="clearfix"></div>
      </div>
      <div class="clearfix"></div>
    </div>
  </div>   <!--菜单-->
  <!-- ============================================================== -->

  <div class="content-page">
    <!-- Start content -->

    <div class="content">
       {% block content %}

       {% endblock %}
      <!-- container -->
    </div>
    <!-- content -->
    <footer class="footer text-right"> 2018-2019 &copy; Noun发布平台 </footer>

  </div>  <!--首页内容-->
  <!-- ============================================================== -->
</div>
{% include  "public/foot_script.html" %}

<script>
    $(document).ready(function() {

        $('.list-unstyled').each(function(){
            var child = $(this).children().length;
            if(child>0){
                $(this).prev().removeAttr('style');
            }
        });

        var pathname = document.location.pathname;

        $('#sidebar-menu .list-unstyled a').each(function(k,value) {
            var a_href=$(value).attr('href');
            if(pathname !='/' && a_href.indexOf(pathname) > -1){
                $(value).addClass('hover').parents('.has_sub').find('.waves-effect').addClass('subdrop').next('.list-unstyled').css('display','block');
            }
        })
    })



</script>
</body>
</html>
